<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #canvas{
            border: 1px solid #ccc;
            width: 600px; height:350px;
        }
    </style>
</head>
<body>
    <canvas id="canvas" width="600" height="350"></canvas>
    <script>
        let cvs=document.getElementById('canvas');
        let ctx=cvs.getContext('2d');
        ctx.rect(50,50,150,80);
        ctx.fillStyle='red';
        ctx.fill();

        ctx.beginPath();
        ctx.arc(280,80,50,0,1.5*Math.PI);
        ctx.strokeStyle='green';
        ctx.closePath();
        ctx.stroke();
    </script>
    
</body>
</html>